package cn.com.wblog.dao;

import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;

import cn.com.wblog.pojo.User;

public class UserDao extends AbstractDao {

	public UserDao(Dao dao) {
		this.dao = dao;
	}
	public User getUser(String username, String password) {
		return dao.fetchLinks(dao.fetch(User.class, Cnd.where("userName", "=", username).and("password", "=", password)), "role");
	}
}
